package com.justgame.project.cloud.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 文件大小容量枚举
 */
@AllArgsConstructor
@Getter
@SuppressWarnings("all")
public enum FileSizeEnum {
    B(1L),
    KB(1024L),
    MB(1024 * 1024L),
    GB(1024 * 1024 * 1024L),
    TB(1024 * 1024 * 1024 * 1024L);
    final Long size;

    public Long getSize() {
        return size;
    }

    public Long getSize(Integer val) {
        return size * val;
    }
}
